
@extends('admin.base')
@section('content')

    <div class="container" >
        @foreach ($category as $value)

            <button class="layui-btn" data-id="{{$value->id}}" style="margin: 5px">{{$value->cate_name}}</button>
        @endforeach
    </div>


@endsection
@section('script')
    <script type="text/javascript">
        $('button').click(function () {
            window.parent.$('#hit_content').val($(this).attr('data-id'));
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
        })
    </script>
@endsection